<template>
  <el-pagination
    background
    layout="prev, pager, next"
    :total="pages.total"
    :page-size="pages.pageSize"
    @current-change="handleCurrentChange"
    v-model:current-page="pages.pageNum"
  />
</template>

<script lang="ts" setup>
import { ref, toRefs } from "vue";
import type { pagesType } from "@/views/commodity/index";
const props = withDefaults(
  defineProps<{
    pages: pagesType;
  }>(),
  {}
);
const emits = defineEmits<{
  (e: "handleCurrentChange", value): void;
}>();
const handleCurrentChange = (value) => {
  emits("handleCurrentChange", value);
};
</script>

<style lang="scss" scoped></style>
